package com.zh.juc.callback;

import java.util.concurrent.TimeUnit;

/**
 * @Author: zhanghuan
 * @date: 2022/10/9 18:53
 * @description: create it
 */
public class Son1 {

    /**
     * 模拟儿子骑车上学花费5s
     *
     * @param listener
     */
    public void ride(CallListener listener) {
        try {
            TimeUnit.SECONDS.sleep(5);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        listener.call();
    }
}
